﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BHan.Migrations
{
    /// <inheritdoc />
    public partial class addIndex : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<bool>(
                name: "delFlag",
                table: "sys_menu",
                type: "tinyint(1)",
                nullable: true,
                defaultValue: false,
                comment: "逻辑删除",
                oldClrType: typeof(bool),
                oldType: "tinyint(1)",
                oldNullable: true,
                oldComment: "逻辑删除");

            migrationBuilder.CreateIndex(
                name: "IX_sys_menu_menuName",
                table: "sys_menu",
                column: "menuName");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_sys_menu_menuName",
                table: "sys_menu");

            migrationBuilder.AlterColumn<bool>(
                name: "delFlag",
                table: "sys_menu",
                type: "tinyint(1)",
                nullable: true,
                comment: "逻辑删除",
                oldClrType: typeof(bool),
                oldType: "tinyint(1)",
                oldNullable: true,
                oldDefaultValue: false,
                oldComment: "逻辑删除");
        }
    }
}
